﻿
@using Janus.BaseEntitys;
@using Janus.Mes.WebClient;
@{
    var CurentUser = Session["CurentUser"] as CurrentUserDTO;
    var menuRoles = new List<ModuleDTO>();
    if (CurentUser != null && CurentUser.Modules != null)
    {
        menuRoles = CurentUser.Modules;
    }
    var b = menuRoles.Where(c => string.IsNullOrEmpty(c.Parent) && c.Types == 0).OrderBy(c => c.Order).ToList();
}

<div class="accordion" fillspace="sidebar">
    @foreach (var item in menuRoles.Where(c => string.IsNullOrEmpty(c.Parent) && c.Types == 0).OrderBy(c => c.Order))
    {
        <div class="accordionHeader">
            <h2>
                <span>Folder</span>@item.ModuleName
            </h2>
        </div>
        <div class="accordionContent">
            @MyHtmlHelper.GenerateLeftMenu(menuRoles.Where(c => c.Parent == item.ID && c.Types == 0).ToList(), menuRoles, 1)
        </div>
    }
</div>

@*<div class="accordion" fillspace="sidebar">
        <div class="accordionHeader">
            <h2>
                <span>Folder</span>系统管理
            </h2>
        </div>
        <div class="accordionContent">
            <ul class="tree treeFolder">
                <li><a href="Users/Default/index" target="navTab" rel="UsersDefault" fresh="true">用户管理</a></li>
            </ul>
        </div>
        <div class="accordionHeader">
            <h2>
                <span>Folder</span>订单管理
            </h2>
        </div>
        <div class="accordionContent">
            <ul class="tree treeFolder">
                <li><a href="/Order/PO/Index" target="navTab" rel="PO">PO订单</a></li>
                <li><a href="/Order/SO/Index" target="navTab" rel="News">SO订单</a></li>
            </ul>
        </div>
        <div class="accordionHeader">
            <h2>
                <span>Folder</span>服务订单管理
            </h2>
        </div>
        <div class="accordionContent">
            <ul class="tree treeFolder">
                <li><a href="/ServiceOrder/ServiceOrder/Index" target="navTab" rel="PO">查询服务订单</a></li>
            </ul>
        </div>
        <div class="accordionHeader">
            <h2>
                <span>Folder</span>关封管理
            </h2>
        </div>
        <div class="accordionContent">
            <ul class="tree treeFolder">
                <li><a href="/CustomsCover/TransferPlant/Index" target="navTab" rel="PO">深加工结转申请表</a></li>
                <li><a href="/CustomsCover/CustomsCoverStatement/Index" target="navTab">关封执行情况表</a></li>
            </ul>
        </div>
    </div>*@
